package com.yan_jiu_sheng.LeetCodeHot100.AC;

/**
 * https://leetcode.cn/problems/single-number/?envType=study-plan-v2&envId=top-100-liked
 * 位运算
 * 自我AC
 *
 * @author yulongtian
 * @create 2024-07-23 16:30
 */
public class Test85 {
    public static void main(String[] args) {

    }

    public int singleNumber(int[] nums) {
        int res = nums[0];
        for (int i = 1; i < nums.length; i++) {
            res ^= nums[i];
        }
        return res;
    }

}
